package com.binvshe.binvshe.contacts;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.binvshe.binvshe.R;
import com.pachong.android.baseuicomponent.activity.BaseActivity;

import butterknife.OnClick;


/**
 * 好友列表
 *
 * @Author: PV
 * @E-mail: pengveivei@sina.cn
 * @CreateDate: 2016-10--26
 * @Version: 1.0.0
 */
public class FriendListActivity extends BaseActivity {
    public FriendListFragment listFrag;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTitle("好友列表");
        enableBackButton();
        initFr();
        getSupportFragmentManager().beginTransaction().add(R.id.lytFriendList, listFrag).commit();

    }

    public void initFr() {
        listFrag = new FriendListFragment();
    }

    @OnClick(R.id.lytSearch)
    public void onBtnSearchClicked() {
        SearchFriendActivity.start(this, SearchFriendActivity.FLAG_MY_FRIEND);
    }

    @Override
    public View createDataView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return layoutInflater.inflate(R.layout.activity_friend_list, null);
    }

}
